package com.example.samples.Vo;

import com.github.pagehelper.PageInfo;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

@Component
public class RestTemplateUtil {

    public static Result findDelete(String url, Integer id){
        String URL=url;

        RestTemplate restTemplate = new RestTemplate();

        HttpHeaders headers = new HttpHeaders();

        HttpEntity<Integer> request = new HttpEntity<>(id, headers);

        ResponseEntity<Result> response = restTemplate.postForEntity(URL, request , Result.class );

        Result data=response.getBody();

        return data;

    }











}
